//
//  EquipmentViewController.m
//  MMairs
//
//  Created by dongguozheng on 2017/3/1.
//  Copyright © 2017年 dongguozheng. All rights reserved.
//

#import "EquipmentViewController.h"
#import "HeaderLeftButton.h"
@interface EquipmentViewController ()

@end

@implementation EquipmentViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"设备";
    [self setupNavButton];
}
#pragma mark---添加左右按钮
-(void)setupNavButton
{
    //添加左侧按钮
    HeaderLeftButton *headerLeftButton=[[HeaderLeftButton alloc]initWithFrame:CGRectMake(0, 0, 80, 35)];
    [headerLeftButton addTarget:self action:@selector(headerLeftButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *item=[[UIBarButtonItem alloc]initWithCustomView:headerLeftButton];
    self.navigationItem.leftBarButtonItem=item;
}
//导航栏左侧按钮点击事件
-(void)headerLeftButtonClicked:(UIButton *)sender
{
    LoginViewController *loginVC=[[LoginViewController alloc]init];
    [self presentViewController:loginVC animated:YES completion:^{
        
    }];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
